\(\int \frac {x}{\sqrt {4 x-x^2}} \, dx\) [69]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 15, antiderivative size = 26 \[ \int \frac {x}{\sqrt {4 x-x^2}} \, dx=-\sqrt {4 x-x^2}-2 \arcsin \left (1-\frac {x}{2}\right ) \]

[Out]

2*arcsin(-1+1/2*x)-(-x^2+4*x)^(1/2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {654, 633, 222} \[ \int \frac {x}{\sqrt {4 x-x^2}} \, dx=-2 \arcsin \left (1-\frac {x}{2}\right )-\sqrt {4 x-x^2} \]

[In]

Int[x/Sqrt[4*x - x^2],x]

[Out]

-Sqrt[4*x - x^2] - 2*ArcSin[1 - x/2]

Rule 222

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt[a])]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 633

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[1/(2*c*(-4*(c/(b^2 - 4*a*c)))^p), Subst[Int[Si
mp[1 - x^2/(b^2 - 4*a*c), x]^p, x], x, b + 2*c*x], x] /; FreeQ[{a, b, c, p}, x] && GtQ[4*a - b^2/c, 0]

Rule 654

Int[((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[e*((a + b*x + c*x^2)^(p +
 1)/(2*c*(p + 1))), x] + Dist[(2*c*d - b*e)/(2*c), Int[(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, p}
, x] && NeQ[2*c*d - b*e, 0] && NeQ[p, -1]

Rubi steps \begin{align*} \text {integral}& = -\sqrt {4 x-x^2}+2 \int \frac {1}{\sqrt {4 x-x^2}} \, dx \\ & = -\sqrt {4 x-x^2}-\frac {1}{2} \text {Subst}\left (\int \frac {1}{\sqrt {1-\frac {x^2}{16}}} \, dx,x,4-2 x\right ) \\ & = -\sqrt {4 x-x^2}-2 \sin ^{-1}\left (1-\frac {x}{2}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.81 \[ \int \frac {x}{\sqrt {4 x-x^2}} \, dx=\frac {(-4+x) x-4 \sqrt {-4+x} \sqrt {x} \log \left (\sqrt {-4+x}-\sqrt {x}\right )}{\sqrt {-((-4+x) x)}} \]

[In]

Integrate[x/Sqrt[4*x - x^2],x]

[Out]

((-4 + x)*x - 4*Sqrt[-4 + x]*Sqrt[x]*Log[Sqrt[-4 + x] - Sqrt[x]])/Sqrt[-((-4 + x)*x)]

Maple [A] (verified)

Time = 2.41 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.88

method result size
default \(2 \arcsin \left (-1+\frac {x}{2}\right )-\sqrt {-x^{2}+4 x}\) \(23\)
risch \(\frac {\left (x -4\right ) x}{\sqrt {-\left (x -4\right ) x}}+2 \arcsin \left (-1+\frac {x}{2}\right )\) \(23\)
pseudoelliptic \(-\sqrt {-\left (x -4\right ) x}-4 \arctan \left (\frac {\sqrt {-\left (x -4\right ) x}}{x}\right )\) \(27\)
meijerg \(\frac {4 i \left (\frac {i \sqrt {\pi }\, \sqrt {x}\, \sqrt {-\frac {x}{4}+1}}{2}-i \sqrt {\pi }\, \arcsin \left (\frac {\sqrt {x}}{2}\right )\right )}{\sqrt {\pi }}\) \(36\)
trager \(-\sqrt {-x^{2}+4 x}-2 \operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) \ln \left (\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) x -2 \operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right )+\sqrt {-x^{2}+4 x}\right )\) \(52\)

[In]

int(x/(-x^2+4*x)^(1/2),x,method=_RETURNVERBOSE)

[Out]

2*arcsin(-1+1/2*x)-(-x^2+4*x)^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.23 \[ \int \frac {x}{\sqrt {4 x-x^2}} \, dx=-\sqrt {-x^{2} + 4 \, x} - 4 \, \arctan \left (\frac {\sqrt {-x^{2} + 4 \, x}}{x}\right ) \]

[In]

integrate(x/(-x^2+4*x)^(1/2),x, algorithm="fricas")

[Out]

-sqrt(-x^2 + 4*x) - 4*arctan(sqrt(-x^2 + 4*x)/x)

Sympy [A] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.65 \[ \int \frac {x}{\sqrt {4 x-x^2}} \, dx=- \sqrt {- x^{2} + 4 x} + 2 \operatorname {asin}{\left (\frac {x}{2} - 1 \right )} \]

[In]

integrate(x/(-x**2+4*x)**(1/2),x)

[Out]

-sqrt(-x**2 + 4*x) + 2*asin(x/2 - 1)

Maxima [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.85 \[ \int \frac {x}{\sqrt {4 x-x^2}} \, dx=-\sqrt {-x^{2} + 4 \, x} - 2 \, \arcsin \left (-\frac {1}{2} \, x + 1\right ) \]

[In]

integrate(x/(-x^2+4*x)^(1/2),x, algorithm="maxima")

[Out]

-sqrt(-x^2 + 4*x) - 2*arcsin(-1/2*x + 1)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.85 \[ \int \frac {x}{\sqrt {4 x-x^2}} \, dx=-\sqrt {-x^{2} + 4 \, x} + 2 \, \arcsin \left (\frac {1}{2} \, x - 1\right ) \]

[In]

integrate(x/(-x^2+4*x)^(1/2),x, algorithm="giac")

[Out]

-sqrt(-x^2 + 4*x) + 2*arcsin(1/2*x - 1)

Mupad [B] (verification not implemented)

Time = 9.21 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.85 \[ \int \frac {x}{\sqrt {4 x-x^2}} \, dx=2\,\mathrm {asin}\left (\frac {x}{2}-1\right )-\sqrt {4\,x-x^2} \]

[In]

int(x/(4*x - x^2)^(1/2),x)

[Out]

2*asin(x/2 - 1) - (4*x - x^2)^(1/2)